import request from '@/hooks/request'

const Api = {
  getWechatFansList: '/platform/wechatFans/getWechatFansList', // 粉丝列表
  editWechatFansRemark: '/platform/wechatFans/editWechatFansRemark', // 修改粉丝备注
  getWechatFansCityList: '/platform/wechatFans/getWechatFansCityList', // 粉丝城市列表
  editWechatFansBalance: '/platform/wechatFans/editWechatFansBalance', // 修改余额
  // 闲鱼
  getFishFansList: '/platform/fishFans/getFishFansList', // 粉丝列表
  editFishFansRemark: '/platform/fishFans/editFishFansRemark', // 修改粉丝备注
  getFishFansCityList: '/platform/fishFans/getFishFansCityList', // 粉丝城市列表
}

export const getWechatFansList = (parameter: Record<any, any>) => {
  return request({
    method: 'post',
    url: Api.getWechatFansList,
    data: parameter,
  })
}

export const editWechatFansRemark = (parameter: Record<any, any>) => {
  return request({
    method: 'post',
    url: Api.editWechatFansRemark,
    data: parameter,
  })
}

export const getWechatFansCityList = (parameter: Record<any, any>) => {
  const formData = new FormData()
  formData.append('robotId', parameter.robotId)
  return request({
    method: 'post',
    url: Api.getWechatFansCityList,
    data: formData,
  })
}

export const editWechatFansBalance = (parameter: Record<any, any>) => {
  return request({
    method: 'post',
    url: Api.editWechatFansBalance,
    data: parameter,
  })
}

export const getFishFansList = (parameter: Record<any, any>) => {
  return request({
    method: 'post',
    url: Api.getFishFansList,
    data: parameter,
  })
}

export const editFishFansRemark = (parameter: Record<any, any>) => {
  return request({
    method: 'post',
    url: Api.editFishFansRemark,
    data: parameter,
  })
}

export const getFishFansCityList = (parameter: Record<any, any>) => {
  const formData = new FormData()
  formData.append('robotId', parameter.robotId)
  return request({
    method: 'post',
    url: Api.getFishFansCityList,
    data: formData,
  })
}

